package tank;

import abstractBeanFactory.BaseTank;

public class FourDirStrategy implements FireStrategy{

	@Override
	public void fire(Tank tank) {
		int bx = tank.getX()+Tank.TANK_WIDTH/2-Bullet.width/2;
		int by = tank.getY()+Tank.TANK_HEIGHT/2-Bullet.height/2;
		Dir[] values = Dir.values();
		for (Dir dir : values) {
			tank.tf.abstractTankBeanFactory.creatBullet(tank.getX(), tank.getY(), dir, tank.group, tank.tf);
		}
		if(tank.group == Group.GOOD) new Thread(()->new Audio("audio/tank_fire.wav").play()).start();
	}

}
